#coding=UTF-8
'''

@author: joseph
'''
import urllib2,re
from BeautifulSoup import BeautifulSoup

url_head='http://chinext.cninfo.com.cn/newmarket/gszx/';
suffix='.jsp';
min_year=2010;
min_stock_code=300001 ;#min 300001
def_month='-12-31';
stocksURL='http://chinext.cninfo.com.cn/newmarket/js/stocklist_cyb.js';
periodMap={}#{'-12-31':'年度','-09-30':'三季','-06-30':'中期','-03-31':'一季'};
period=[]#['-12-31','-09-30','-06-30','-03-31'];
years=[]
encode='utf-8'


def concatUrl(head,tail):
    return head+'/'+tail;

def readHtml(url):
    page = urllib2.urlopen(url);
    return page.read();   

def soupUrl(url):
    return  BeautifulSoup(readHtml(url));

stocks=re.findall('(?<=|)\d+(?=:)', readHtml(stocksURL).strip());
#stocks=[300001,300002]



